package com.pointi.emoTools;

public class ezData
{
	//// DEF //__________________________________________________ 
	
	private int depth ;
	private int cluster ;
	private double [] element ;
	
	//// INIT //__________________________________________________
	
	public ezData(int depth)
	{
		this.depth = depth ;
		this.cluster = 0 ;
		element = new double[this.depth] ;
		for (int i=0; i<this.depth; i++) element[i] = 0.0 ;
	}
	public ezData(double [] element, int depth)
	{
		this.depth = depth ;
		this.cluster = 0 ;
		this.element = new double[this.depth] ;
		System.arraycopy(element, 0, this.element, 0, element.length) ;
	}

	//// SET //__________________________________________________
	
	public void depth(int value) { this.depth = value ; }
	public void cluster(int value) { this.cluster = value ; }
	public void element(double [] value) { System.arraycopy(value, 0, this.element, 0, value.length) ; }

	//// GET //__________________________________________________
	
	public int depth() { return this.depth ; }
	public int cluster() { return this.cluster ; }
	public double [] element() { return this.element ; }
	
	//// UTIL //__________________________________________________
	
	public void fnPrintCluster()
	{
		System.out.print("\tCluster : " + this.cluster) ;
	}

	public void fnPrintElement()
	{
		//System.out.print("\tElements : ") ;
		System.out.print("\t ") ;
		for (int i=0; i<this.depth; i++)
			if (i+1 < this.depth)
				System.out.print(this.element[i] + ", ") ;
			else
				System.out.print(this.element[i]) ;
		System.out.print("\n") ;
	}
	
	//// EOC //__________________________________________________
}